package com.erick.contacts.helper;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**  
 * @Title: DBHelper.java
 * @Package com.erick.contacts.helper
 * @company：  科贸学院
 * @Description: 
 * @author ChenBin 
 * @date 2012-9-27 下午11:46:42
 * @version V1.0  
 */
public class DBHelper extends SQLiteOpenHelper {
	
	private static final String DBNAME = "contacts.db";
	private static final int DBVERSION = 1;

	public DBHelper(Context context) {
		super(context, DBNAME, null, DBVERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		System.out.println("create a databases");
		db.execSQL("create table contact_list(id integer primary key autoincrement,name varchar(20),phone varchar(20),email varchar(30))");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int newVersion, int oldVersion) {
		System.out.println("update a databases");
	}

}
